<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AddForum.ascx.cs" Inherits="forums_controls_administration_AddForum" %>
<%@ Register Src="../forums/ForumListBox.ascx" TagName="ForumListBox" TagPrefix="uc1" %>
<h2>Create A New Forum</h2>
<asp:Literal runat="server" ID="lblSuccess" Visible="false" EnableViewState="false" Text="[success message]" />
<p>
    Category:<br />
    <asp:ListBox runat="Server" ID="lstCategory"
        DataTextField="Name"
        DataValueField="ID"
        Rows="1"
        AutoPostBack="True"
        OnSelectedIndexChanged="lstCategory_SelectedIndexChanged" />
</p>
<asp:MultiView runat="server" ID="mviewForum">
    <asp:View runat="server" ID="viewNone">
        Choose a category.
    </asp:View>
    <asp:View runat="server" ID="viewForum">
        <p>
            Parent Forum:<br />
            <asp:ListBox runat="Server" ID="lstForum"
                DataTextField="Name"
                DataValueField="ID"
                Rows="1">
            </asp:ListBox>
            </p>
        <p>
            Forum Name:<br />
            <asp:TextBox runat="server" ID="txtName" ValidationGroup="AddForum" />
            <asp:RequiredFieldValidator ID="valFolderNameRequired" runat="server" ControlToValidate="txtName"
                ErrorMessage="This is a required field, asshole." ValidationGroup="AddForum" EnableClientScript="False"></asp:RequiredFieldValidator></p>
        <p>
            Description:<br />
            <asp:TextBox runat="server" ID="txtDescription"
                TextMode="multiLine" Columns="60" Rows="4"/>
        </p>
        <p>
            Visibility:<br />
            <asp:DropDownList ID="ddlVisibility" runat="server">
                <asp:ListItem Value="0">All Users</asp:ListItem>
                <asp:ListItem Value="1">Registered Users</asp:ListItem>
                <asp:ListItem Value="2">Moderators</asp:ListItem>
                <asp:ListItem Value="3">Super Moderators</asp:ListItem>
                <asp:ListItem Value="4">Administrators</asp:ListItem>
            </asp:DropDownList>
        </p>
        <p>
            <asp:Button runat="server" ID="btnAdd"
                Text="Create New Forum" OnClick="btnAdd_Click" ValidationGroup="AddForum" />
        </p>
    </asp:View>
</asp:MultiView>